package cn.edu.dgut.css.sai.lab2demo;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.event.ApplicationEventMulticaster;

@SpringBootTest
public class lab2DemoApplicationTests {

    @Autowired
    ApplicationEventMulticaster eventMulticaster;

    @Test
    public void testAsyncEventMulticaster()throws InterruptedException{
        eventMulticaster.multicastEvent(new Lab2AutoConfig.NoticeEvent("东莞理工学院"));
        eventMulticaster.multicastEvent(new Lab2AutoConfig.NoticeEvent("网安学院"));
        Thread.sleep(2000);


    }
}
